using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Zero.Entity.Models.Mapping
{
    public class Sys_ButtonClassMap : EntityTypeConfiguration<Sys_ButtonClass>
    {
        public Sys_ButtonClassMap()
        {
            // Primary Key
            this.HasKey(t => t.BtnClassID);

            // Properties
            this.Property(t => t.BtnClassID)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.BtnClass)
                .HasMaxLength(50);

            this.Property(t => t.BtnClassName)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Sys_ButtonClass");
            this.Property(t => t.BtnClassID).HasColumnName("BtnClassID");
            this.Property(t => t.BtnClass).HasColumnName("BtnClass");
            this.Property(t => t.BtnClassName).HasColumnName("BtnClassName");
            this.Property(t => t.CreateUserID).HasColumnName("CreateUserID");
            this.Property(t => t.CreateDate).HasColumnName("CreateDate");
            this.Property(t => t.ModifyUserID).HasColumnName("ModifyUserID");
            this.Property(t => t.ModifyDate).HasColumnName("ModifyDate");
            this.Property(t => t.IsEnable).HasColumnName("IsEnable");
            this.Property(t => t.OrderIndex).HasColumnName("OrderIndex");
        }
    }
}
